
 <!DOCTYPE HTML>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
  
    <title>TCP/IP学习笔记（一） | KingPong&#39; Blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="KingPong">
    

    
    <meta name="description" content="TCP/IP 协议学习笔记（一）    TCP/IP协议顾名思义是TCP和IP协议协同工作，TCP主要负责应用软件（如浏览器）与网络软件之间的通信，负责将数据分割并装入 IP 包， 然后在它们到达的时候重新组合它们。IP主要负责计算机之间的通信，负责将包发送至接受者。简单的说，TCP/IP协议是定义电子设备如何  接入INTER网，和数据在INTER网中如何传输。 OSI七层模型图解 OSI是Op">
<meta name="keywords" content="TCP&#x2F;IP">
<meta property="og:type" content="article">
<meta property="og:title" content="TCP&#x2F;IP学习笔记（一）">
<meta property="og:url" content="http://yoursite.com/2018/12/10/TCP-IP学习笔记（一）/index.html">
<meta property="og:site_name" content="KingPong&#39; Blog">
<meta property="og:description" content="TCP/IP 协议学习笔记（一）    TCP/IP协议顾名思义是TCP和IP协议协同工作，TCP主要负责应用软件（如浏览器）与网络软件之间的通信，负责将数据分割并装入 IP 包， 然后在它们到达的时候重新组合它们。IP主要负责计算机之间的通信，负责将包发送至接受者。简单的说，TCP/IP协议是定义电子设备如何  接入INTER网，和数据在INTER网中如何传输。 OSI七层模型图解 OSI是Op">
<meta property="og:locale" content="default">
<meta property="og:image" content="https://images2015.cnblogs.com/blog/1099668/201702/1099668-20170212153338135-125492424.jpg">
<meta property="og:image" content="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234825491-384470376.png">
<meta property="og:image" content="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234826351-1957282396.png">
<meta property="og:image" content="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234827195-1493107425.png">
<meta property="og:updated_time" content="2018-12-10T09:29:18.556Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="TCP&#x2F;IP学习笔记（一）">
<meta name="twitter:description" content="TCP/IP 协议学习笔记（一）    TCP/IP协议顾名思义是TCP和IP协议协同工作，TCP主要负责应用软件（如浏览器）与网络软件之间的通信，负责将数据分割并装入 IP 包， 然后在它们到达的时候重新组合它们。IP主要负责计算机之间的通信，负责将包发送至接受者。简单的说，TCP/IP协议是定义电子设备如何  接入INTER网，和数据在INTER网中如何传输。 OSI七层模型图解 OSI是Op">
<meta name="twitter:image" content="https://images2015.cnblogs.com/blog/1099668/201702/1099668-20170212153338135-125492424.jpg">

    
    <link rel="alternative" href="/atom.xml" title="KingPong&#39; Blog" type="application/atom+xml">
    
    
    <link rel="icon" href="/KingPongBlog/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/KingPongBlog/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/KingPongBlog/img/jacman.jpg">
    
    <link rel="stylesheet" href="/KingPongBlog/css/style.css">
</head>
</html>
  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/KingPongBlog/"><img src="/KingPongBlog/img/logoko.png" alt="KingPong&#39; Blog" title="KingPong&#39; Blog"></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/KingPongBlog/" title="KingPong&#39; Blog">KingPong&#39; Blog</a></h1>
				<h2 class="blog-motto">A Technology Accumulation Blog</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/KingPongBlog/">主页</a></li>
					
						<li><a href="/KingPongBlog/archives">目录</a></li>
					
						<li><a href="/KingPongBlog/about">关于</a></li>
					
					<li>
 					
					<form class="search" action="/KingPongBlog/search/index.html" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="search" id="search" autocomplete="off" name="q" maxlength="20" placeholder="Search">
					</form>
					
					</li>
				</ul>
			</ul></nav>			
</div>
    </header>
    <div id="container">
      <div id="main" class="post" itemscope="" itemprop="blogPost">
  
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/KingPongBlog/2018/12/10/TCP-IP学习笔记（一）/" title="TCP/IP学习笔记（一）" itemprop="url">TCP/IP学习笔记（一）</a>
  </h1>
  <p class="article-author">By
       
		<a href="/KingPongBlog/about" title="KingPong" target="_blank" itemprop="author">KingPong</a>
		
  </p><p class="article-time">
    <time datetime="2018-12-10T09:27:45.000Z" itemprop="datePublished"> Published 2018-12-10</time>
    
  </p>
</header>
	<div class="article-content">
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">Contents</strong>
		
			<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#TCP-IP-协议学习笔记（一）"><span class="toc-number">1.</span> <span class="toc-text">TCP/IP 协议学习笔记（一）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#OSI七层模型图解"><span class="toc-number">1.0.1.</span> <span class="toc-text">OSI七层模型图解</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#TCP-IP五层模型图解"><span class="toc-number">1.0.2.</span> <span class="toc-text">TCP/IP五层模型图解</span></a></li></ol></li></ol>
		
		</div>
		
		<h1 id="TCP-IP-协议学习笔记（一）"><a href="#TCP-IP-协议学习笔记（一）" class="headerlink" title="TCP/IP 协议学习笔记（一）"></a>TCP/IP 协议学习笔记（一）</h1><pre><code>    TCP/IP协议顾名思义是TCP和IP协议协同工作，TCP主要负责应用软件（如浏览器）与网络软件之间的通信，负责将数据分割并装入 IP 包，
然后在它们到达的时候重新组合它们。IP主要负责计算机之间的通信，负责将包发送至接受者。简单的说，TCP/IP协议是定义电子设备如何
 接入INTER网，和数据在INTER网中如何传输。
</code></pre><h3 id="OSI七层模型图解"><a href="#OSI七层模型图解" class="headerlink" title="OSI七层模型图解"></a>OSI七层模型图解</h3><p><img src="https://images2015.cnblogs.com/blog/1099668/201702/1099668-20170212153338135-125492424.jpg" alt=""></p>
<pre><code>OSI是Open System Interconnect的缩写，意为开放式系统互联。
OSI参考模型只是一个模型，对各层只做了粗略的定义，并没有对接口和协议做详细的定义，想深入了解还需要学习具体的协议规范。
</code></pre><h3 id="TCP-IP五层模型图解"><a href="#TCP-IP五层模型图解" class="headerlink" title="TCP/IP五层模型图解"></a>TCP/IP五层模型图解</h3><pre><code>TCP/IP五层协议和OSI的七层协议对应关系如下。
</code></pre><p><img src="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234825491-384470376.png" alt=""></p>
<p><img src="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234826351-1957282396.png" alt=""></p>
<p><img src="https://images2015.cnblogs.com/blog/705728/201604/705728-20160424234827195-1493107425.png" alt=""></p>
<pre><code>以上是OSI七层结构和TCP/IP五层结构的图解，之后会完善每层中具体的协议学习。
</code></pre>  
	</div>
		<footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/KingPongBlog/tags/TCP-IP/">TCP/IP</a>
  </div>

</div>



	<div class="article-share" id="share">
	
	  <div data-url="http://yoursite.com/2018/12/10/TCP-IP学习笔记（一）/" data-title="TCP/IP学习笔记（一） | KingPong&#39; Blog" data-tsina="" class="share clearfix">
	  </div>
	
	</div>


</footer>

   	       
	</article>
	
<nav class="article-nav clearfix">
 

<div class="next">
<a href="/KingPongBlog/2018/12/07/firstArticle/" title="firstArticle">
 <strong>下一篇：</strong><br> 
 <span>firstArticle
</span>
</a>
</div>

</nav>

	



</div>  
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">Contents</strong>
 
 <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#TCP-IP-协议学习笔记（一）"><span class="toc-number">1.</span> <span class="toc-text">TCP/IP 协议学习笔记（一）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#OSI七层模型图解"><span class="toc-number">1.0.1.</span> <span class="toc-text">OSI七层模型图解</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#TCP-IP五层模型图解"><span class="toc-number">1.0.2.</span> <span class="toc-text">TCP/IP五层模型图解</span></a></li></ol></li></ol>
 
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  


  

  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			
				<li><a href="/KingPongBlog/tags/TCP-IP/" title="TCP/IP">TCP/IP<sup>1</sup></a></li>
			
		
		</ul>
</div>


  <div class="linkslist">
  <p class="asidetitle">Links</p>
    <ul>
        
          <li>
            
            	<a href="https://coderq.com" target="_blank" title="一个面向程序员交流分享的新一代社区">码农圈</a>
            
          </li>
        
          <li>
            
            	<a href="http://wuchong.me" target="_blank" title="Jark&#39;s Blog">Jark&#39;s Blog</a>
            
          </li>
        
    </ul>
</div>

  


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>

  <div class="weiboshow">
  <p class="asidetitle">Weibo</p>
    <iframe width="100%" height="119" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=&verifier=b3593ceb&dpc=1"></iframe>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer">
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> 一个初出茅庐的小菜鸡 <br>
			一个小小的技术博客，勿忘初衷……</p>
	</section>
	 
	<div class="social-font">
		
		<a href="http://weibo.com/2176287895" target="_blank" class="icon-weibo" title="微博"></a>
		
		
		
		
		
		
		
		
		
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2018 
		
		<a href="/KingPongBlog/about" target="_blank" title="KingPong">KingPong</a>
		
		
		</p>
</div>
</footer>
    <script src="/KingPongBlog/js/jquery-2.0.3.min.js"></script>
<script src="/KingPongBlog/js/jquery.imagesloaded.min.js"></script>
<script src="/KingPongBlog/js/gallery.js"></script>
<script src="/KingPongBlog/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  c.click(function(){
    ta.css('display', 'block').addClass('fadeIn');
  });
  o.click(function(){
    ta.css('display', 'none');
  });
  $(window).scroll(function(){
    ta.css("top",Math.max(140,320-$(this).scrollTop()));
  });
});
</script>


<script type="text/javascript">
$(document).ready(function(){ 
  var $this = $('.share'),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      title = $this.attr('data-title'),
      tsina = $this.attr('data-tsina'),
      description = $this.attr('description');
  var html = [
  '<div class="hoverqrcode clearfix"></div>',
  '<a class="overlay" id="qrcode"></a>',
  '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
  '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
  '<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
  '<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
  '<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
  '<span title="Share to"></span>'
  ].join('');
  $this.append(html);

  $('.hoverqrcode').hide();

  var myWidth = 0;
  function updatehoverqrcode(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
    var qrsize = myWidth > 1024 ? 200:100;
    var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
    var p = $('.article-share-qrcode').position();
    $('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
                          .css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
                          .qrcode(options);
  };
  $(window).resize(function(){
    $('.hoverqrcode').hide();
  });
  $('.article-share-qrcode').click(function(){
    updatehoverqrcode();
    $('.hoverqrcode').toggle();
  });
  $('.article-share-qrcode').hover(function(){}, function(){
      $('.hoverqrcode').hide();
  });
});   
</script>











<link rel="stylesheet" href="/KingPongBlog/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/KingPongBlog/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->



<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?e6d1f421bbc9962127a50488f9ed37d1";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>



<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="Back to Top"><img src="/KingPongBlog/img/scrollup.png"></a>
	</div>
	<script src="/KingPongBlog/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<script>
var option = {
  engineKey: ''
};
(function(w,d,t,u,n,s,e){
  s = d.createElement(t);
  s.src = u;
  s.async = 1;
  w[n] = function(r){
    w[n].opts = r;
  };
  e = d.getElementsByTagName(t)[0];
  e.parentNode.insertBefore(s, e);
})(window,document,'script','//tinysou-cdn.b0.upaiyun.com/ts.js','_ts');
_ts(option);
</script>

<!-- Tiny_search End -->

  </body>
</html>
